package com.ces.knacky.model;

import java.io.Serializable;
import java.util.Set;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;

import com.ces.knacky.framework.model.AbstractBaseEntity;

/** @author Hibernate CodeGenerator */
public class AddressType extends AbstractBaseEntity implements Serializable {

    /** persistent field */
    private Set addresses;

    /** full constructor */
    public AddressType(String description, Set addresses) {
        this.description = description;
        this.addresses = addresses;
    }

    /** default constructor */
    public AddressType() {
    }

    public Set getAddresses() {
        return this.addresses;
    }

    public void setAddresses(Set addresses) {
        this.addresses = addresses;
    }


    public boolean equals(Object other) {
        if ( !(other instanceof AddressType) ) return false;
        AddressType castOther = (AddressType) other;
        return new EqualsBuilder()
            .append(this.getId(), castOther.getId())
            .isEquals();
    }

}
